Initially I looked at the effects of 1% DMSO, 1% Methanol and 1% DMSO + 1% Methanol on growth rates in comparison to controls in media alone.

Growth curves were generated using a BMG Microplate Reader.Initially, the plate reading settings were:

The plate reader outputs the data in a very odd format so the first thing to do is remove all the unnecessary information and convert time into minutes. I used zsh for this.

#!/usr/bin/env zsh

# setwd
cd /Users/guy/Documents/phd/DEG_yeast_insecticide_expt/senstivity_test/dmso_methanol_sens/

source ./WHATIDID_func.sh

format_growth_assay_data dmso_methanol_sens_raw_mixture_2020_07_15 dmso_meth_2020_07_15

After this point I worked in R. I used the packages:

Version
rstatix 0.6.0
ggpubr 0.3.0.999
knitr 1.28
plyr 1.8.6
forcats 0.5.0
stringr 1.4.0
dplyr 1.0.0
purrr 0.3.4
readr 1.3.1
tidyr 1.1.0
tibble 3.0.1
ggplot2 3.3.0
tidyverse 1.3.0

The data first needed to be blank corrected.

Here are the untransformed growth curves (OD vs Time):

And this is what they look like once ODt -> ln(ODt). This is done to calculate the growth rate, which is the gradient of the exponential phase.

To get all the treatments to start from 0 ln(ODt/OD0) was performed.

Although the starting yeast stock volume should have been the same for all treatments, dividing by OD0 showed this clearly wasn’t the case. The smaller volume that was pipetted into DMSO resulted in a higher final ln(ODt/OD0).

Each treatment began with yeast cells in the log phase (0.4-0.6OD). Cells were then diluted to a final OD of 0.05 in the microplate well. On visual inspection there doesn’t seem to be much difference between the growth rates of the treatments. To quantify growth rates, either the maximum growth rate can be calculated, or the growth rate across a broader time interval. The second option accounts for random fluctuations in growth rate. I chose the second option. To determine the time interval used to measure the growth rate, ln(ODt/OD0) vs time was plotted for 5 time point intervals. For example, t = 0,5,10,15,20. The slope (growth rate) was calculated and saved. The same was done for all 5 time point intervals and time points associated with slopes that were ≥90% of the maximum slope were used to calculate the final growth rate.

Maximum Gradients of DMSO, Methanol and DMSO+Methanol Treated Yeast Cells and Associated Timepoint Windows
Maximum Gradient Treatment Timepoint Windows ≥90% of Maximum Gradient
0.0881770 control 1
0.1250191 dmso 1
0.0766652 methanol 1
0.0830781 mixture 1

To try and extend the log phase, the volume of yeast stock was varied so that the final OD in the microplate well was = 0.05 (x1), 0.01 (x5), 0.005 (x10), 0.0025 (x20), 0.001 (x50) and 0.0005 (x100). The idea behind this being that if wells were inoculated with a lower yeast concentration initially then the nutrients in the medium wouldn’t be exhausted as quickly, resulting in a longer log phase. This wasn’t the case using the settings detailed at the beginning of this document. Here are the untransformed results:

And here are the results once log transformed:

And then divided by t0:

For some reason, decreasing the starting yeast cell concentration also decreased the maximum yeast cell concentration. This was unexpected. All dilutions should reach the same maximum yeast cell concentration, which suggests that some of the machine settings were affecting yeast growth. I repeated the dilution experiment with 60s shaking before cycles. This resolved the issue:

To try and create optimal growth conditions I altered the settings so the maximum amount of shaking was performed (272s every 300s). This was for 60 wells, which will be the number of wells used when pesticides start to be tested.

Here are the ln(OD) results:

## Warning in FUN(X[[i]], ...): NaNs produced

## Warning in FUN(X[[i]], ...): NaNs produced

## Warning in FUN(X[[i]], ...): NaNs produced

## Warning in FUN(X[[i]], ...): NaNs produced

I think attaching the parafilm cover interferes with the OD measurements. Blank readings don’t stabilise until around the 1 hour mark. This creates negative readings at the beginning of the run that produce NaN when ln(). Also, dividing by t0 no longer has the desired effect as t0 has been inflated, causing negative readings once ln(). Try without parafilm cover as evaporation shouldn’t be a problem over 16h. If geom_smooth is used instead of geom_line it hides a multitude of sins.

If I don’t correct for the blanks it remove the NaNs:

Maximum Gradients of Yeast Starting Dilutions and Associated Timepoint Windows
Maximum Gradient Treatment Timepoint Windows ≥90% of Maximum Gradient
0.0274695 1- 26
0.0307231 5- 64:65
0.0393765 10- 80:81
0.0252441 20- 101:102
0.0213705 50- 125:126
0.0219001 100- 159

Remove parafilm cover or keep on and don’t correct for blanks? This would prevent spill from one well to another. The parafilm cover has to remain on to avoid contamination and evaporation. To combat evaporation I doubled the total volume in the well to 200\(\mu\)l. This smoothed the curves too. I also started with a theoretical starting OD of 0.01 not 0.05 this time.

Maximum Gradients of Different Solvents and Associated Timepoint Windows
Maximum Gradient Treatment Timepoint Windows ≥90% of Maximum Gradient
0.0149878 control 2:3
0.0210931 dmso 1
0.0169339 methanol 5:6
0.0287791 mixture 1

Here is each replicate plotted individually:

Does removing blank correction alter initial variation? Yes.

What are the timepoints associated with the exponential phase now?

Maximum Gradients of Different Solvents and Associated Timepoint Windows
Maximum Gradient Treatment Timepoint Windows ≥90% of Maximum Gradient
0.0057912 control c(44, 48, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76)
0.0055106 dmso 52:79
0.0058497 methanol c(47, 48, 49, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 70, 71)
0.0053631 mixture c(23, 24, 42, 43, 44, 45, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 76)

Colour all replicates of one treatment the same. If I try and use scale colour manual all lines must be set to different colours. If I create a new column with control, dmso, methanol and mixture and use this in ggplot2 it returns the unpleasant results below. Not sure how to get output to be individual lines coloured by treatment instead of shaded areas that go an odd colour when they overlap.

This doesn’t bother me too much as replicates won’t be shown individually in results. Was going to remove between t0 and t100 but removing blank correction appears to have resolved initial fluctuation. Finally the machine settings and experimental design are producing the expected results. I want to see if there is a significant difference between the control, mean, dmso and mixture. The null hypothesis is there is no difference between them. To do this I have to perform a one way ANOVA. Before this I have to define the exponential phase and perform a linear regression to return a growth rate for each replicate. When defining the timepoints that contribute to the exponential phase there needs to be a mechanism in place that only takes the longest unbroken sequence of values that are ≤5 away from their neighbours. For example, 23, 24, 42, 43, 44, 45, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 76 would return 42:76. The first step is to write a function that outputs the max growth rate and timepoint windows associated with ≤80% max growth rate for each replicate. Not sure what to make the cut off point.

Maximum Gradients of DMSO, Methanol and DMSO+Methanol Treated Yeast Cells and Associated Timepoint Windows
Maximum Gradient Treatment Timepoint Windows ≥80% of Maximum Gradient
0.0062616 control1 c(15, 16, 17, 28, 29, 30, 31, 36, 41, 42, 43, 44, 45, 46, 47, 48, 49, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79)
0.0059748 control2 c(36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 79, 80)
0.0062250 control3 c(39, 44, 45, 47, 48, 49, 50, 51, 52, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 89, 90)
0.0062989 control4 c(44, 48, 49, 50, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 84, 85, 86, 87, 89, 90)
0.0060273 control5 c(2, 40, 41, 42, 43, 44, 45, 46, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 83, 84)
0.0058078 dmso1 c(39, 43, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 90, 91)
0.0058148 dmso2 c(12, 18, 19, 48, 49, 50, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 87, 88, 92, 93, 94)
0.0059363 dmso3 c(34, 35, 36, 39, 40, 41, 42, 43, 44, 45, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79)
0.0055708 dmso4 c(39, 40, 41, 42, 43, 44, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 95, 96, 101, 102)
0.0058639 dmso5 c(28, 29, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86)
0.0059640 methanol1 c(5, 17, 18, 32, 33, 37, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 79, 81, 82, 83, 84)
0.0063428 methanol2 c(20, 39, 41, 42, 43, 47, 48, 49, 50, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71)
0.0061989 methanol3 c(16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 34, 35, 36, 37, 38, 39, 41, 42, 44, 45, 46, 47, 48, 51, 52, 53, 54, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 70, 71)
0.0060010 methanol4 c(39, 40, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 87, 88)
0.0061630 methanol5 c(39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 73, 74)
0.0057420 mixture1 c(6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 22, 23, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 69, 70, 71, 72, 73, 74, 75)
0.0059020 mixture2 c(1, 43, 44, 48, 49, 50, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 79, 80, 81, 82)
0.0062250 mixture3 c(18, 21, 22, 23, 24, 25, 29, 30, 31, 32, 33, 43, 44, 51, 52, 53, 54, 55, 58, 59, 60, 63, 64, 65, 66, 67, 68, 71, 72)
0.0055067 mixture4 c(24, 25, 26, 42, 43, 44, 45, 46, 47, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 92, 93, 94, 96)
0.0061416 mixture5 c(1, 2, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 41, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 76, 77, 78)

Second, extract the longest sequence of timepoint windows with ≥80% growth rate maximum that are separated by ≤5 from neighbours. Then perform linear regression on exponential phases to return final growth rates for each replicate.

Individual Replicates With Associated Exponential Phase Growth Rate (OD/min)
group growth_rate
control 0.0053513
control 0.0054138
control 0.0053934
control 0.0055007
control 0.0053604
dmso 0.0051525
dmso 0.0052430
dmso 0.0052491
dmso 0.0050054
dmso 0.0052449
methanol 0.0052222
methanol 0.0052942
methanol 0.0052901
methanol 0.0052509
methanol 0.0054073
mixture 0.0051960
mixture 0.0051416
mixture 0.0051550
mixture 0.0048438
mixture 0.0052742

Next the stats to determine if there is a significant difference between the controls and solvent concentrations

## # A tibble: 4 x 5
##   group    variable        n  mean    sd
##   <fct>    <chr>       <dbl> <dbl> <dbl>
## 1 control  growth_rate     5 0.005     0
## 2 dmso     growth_rate     5 0.005     0
## 3 methanol growth_rate     5 0.005     0
## 4 mixture  growth_rate     5 0.005     0

## # A tibble: 4 x 4
##   group    growth_rate is.outlier is.extreme
##   <fct>          <dbl> <lgl>      <lgl>     
## 1 control      0.00550 TRUE       FALSE     
## 2 dmso         0.00501 TRUE       FALSE     
## 3 methanol     0.00541 TRUE       FALSE     
## 4 mixture      0.00484 TRUE       TRUE

there was an extreme outlier. Can include the outlier in the analysis anyway if you do not believe the result will be substantially affected. This can be evaluated by comparing the result of the ANOVA test with and without the outlier. It’s also possible to keep the outliers in the data and perform a robust ANOVA test using the WRS2 package.

  1. normality - Analyzing the ANOVA model residuals to check the normality for all groups together. This approach is easier and it’s very handy when you have many groups or if there are few data points per group.

NOTE - Note that, normality test is sensitive to sample size. Small samples most often pass normality tests. Therefore, it’s important to combine visual inspection and significance test in order to take the right decision. This is why I chose to model residuals not each group individually.

Create a QQ plot of residuals, density plot and Shapiro Wilks test

## # A tibble: 1 x 3
##   variable         statistic p.value
##   <chr>                <dbl>   <dbl>
## 1 residuals(model)     0.916  0.0822

from these three tests I conclude that the probability distribution of the data is not significantly different from a normal distribution.

if I check the normality assumption by group DMSO isn’t normally distributed. Feel like my data is borderline going to carry out ANOVA and Kruskal-Wallis test to see if they yield different results.

## # A tibble: 4 x 4
##   group    variable    statistic      p
##   <fct>    <chr>           <dbl>  <dbl>
## 1 control  growth_rate     0.884 0.328 
## 2 dmso     growth_rate     0.768 0.0436
## 3 methanol growth_rate     0.897 0.394 
## 4 mixture  growth_rate     0.833 0.146
  1. homogeneity of variance assumption - a “residuals versus fits plot” tests homogeneity of variance. The three tests below also do this. For all the null hypothesis is that variance is homogeneous (Homoscedasticity). Levene and fligner are robust against departures from normality.
## # A tibble: 1 x 4
##     df1   df2 statistic     p
##   <int> <int>     <dbl> <dbl>
## 1     3    16     0.424 0.738
## 
##  Fligner-Killeen test of homogeneity of variances
## 
## data:  growth_rate by group
## Fligner-Killeen:med chi-squared = 0.98807, df = 3, p-value = 0.8041
## 
##  Bartlett test of homogeneity of variances
## 
## data:  growth_rate by group
## Bartlett's K-squared = 4.5011, df = 3, p-value = 0.2122

There is no significant difference between variance across groups. Therefore, we can assume homogeneity of variance in the different treatment groups. Perform ANOVA and post-hoc Tukey

## Coefficient covariances computed by hccm()
## ANOVA Table (type II tests)
## 
##   Effect DFn DFd     F     p p<.05   ges
## 1  group   3  16 6.738 0.004     * 0.558
## # A tibble: 6 x 8
##   term  group1   group2     estimate   conf.low  conf.high   p.adj p.adj.signif
## * <chr> <chr>    <chr>         <dbl>      <dbl>      <dbl>   <dbl> <chr>       
## 1 group control  dmso     -0.000225  -0.000420  -0.0000300 0.0211  *           
## 2 group control  methanol -0.000111  -0.000306   0.0000840 0.391   ns          
## 3 group control  mixture  -0.000282  -0.000477  -0.0000869 0.00389 **          
## 4 group dmso     methanol  0.000114  -0.0000810  0.000309  0.369   ns          
## 5 group dmso     mixture  -0.0000569 -0.000252   0.000138  0.837   ns          
## 6 group methanol mixture  -0.000171  -0.000366   0.0000241 0.0968  ns

Tukey pairwise comparisons reveal a significant difference between control vs dmso and control vs mixture.

Does 1) removing the extreme outlier and then performing an ANOVA and 2) removing the extreme outlier and then performing a Kruskal-Wallis test affect the results?

Groups with unequal sample size can affect the statistical power of ANOVA. Can affect the homogeneity of variance. If the homogeneity of variance is affected perform a Welch.

  1. identifying extreme outliers and removing them.

Performing ANOVA on dataset without extreme outliers. Test assumptions

visualisation

ggboxplot(exponential_phase_slopes, x = “group”, y = “growth_rate”)

## # A tibble: 3 x 4
##   group    growth_rate is.outlier is.extreme
##   <fct>          <dbl> <lgl>      <lgl>     
## 1 control      0.00550 TRUE       FALSE     
## 2 dmso         0.00501 TRUE       FALSE     
## 3 methanol     0.00541 TRUE       FALSE

## # A tibble: 1 x 3
##   variable         statistic p.value
##   <chr>                <dbl>   <dbl>
## 1 residuals(model)     0.945   0.323

## # A tibble: 1 x 4
##     df1   df2 statistic     p
##   <int> <int>     <dbl> <dbl>
## 1     3    15     0.176 0.911
## 
##  Fligner-Killeen test of homogeneity of variances
## 
## data:  growth_rate by group
## Fligner-Killeen:med chi-squared = 0.049433, df = 3, p-value = 0.9971
## 
##  Bartlett test of homogeneity of variances
## 
## data:  growth_rate by group
## Bartlett's K-squared = 1.6144, df = 3, p-value = 0.6561
## Coefficient covariances computed by hccm()
## ANOVA Table (type II tests)
## 
##   Effect DFn DFd     F     p p<.05  ges
## 1  group   3  15 8.895 0.001     * 0.64
## # A tibble: 6 x 8
##   term  group1   group2     estimate   conf.low  conf.high   p.adj p.adj.signif
## * <chr> <chr>    <chr>         <dbl>      <dbl>      <dbl>   <dbl> <chr>       
## 1 group control  dmso     -0.000225  -0.000365  -0.0000846 0.0017  **          
## 2 group control  methanol -0.000111  -0.000251   0.0000294 0.147   ns          
## 3 group control  mixture  -0.000212  -0.000361  -0.0000634 0.00459 **          
## 4 group dmso     methanol  0.000114  -0.0000264  0.000254  0.133   ns          
## 5 group dmso     mixture   0.0000127 -0.000136   0.000162  0.995   ns          
## 6 group methanol mixture  -0.000101  -0.000250   0.0000476 0.246   ns

  1. Kruskal-Wallis test without extreme outlier
## # A tibble: 1 x 6
##   .y.             n statistic    df       p method        
## * <chr>       <int>     <dbl> <int>   <dbl> <chr>         
## 1 growth_rate    19      12.5     3 0.00589 Kruskal-Wallis
## # A tibble: 1 x 5
##   .y.             n effsize method  magnitude
## * <chr>       <int>   <dbl> <chr>   <ord>    
## 1 growth_rate    19   0.632 eta2[H] large
## # A tibble: 6 x 9
##   .y.         group1   group2     n1    n2 statistic       p  p.adj p.adj.signif
## * <chr>       <chr>    <chr>   <int> <int>     <dbl>   <dbl>  <dbl> <chr>       
## 1 growth_rate control  dmso        5     5   -3.03   0.00241 0.0145 *           
## 2 growth_rate control  methan…     5     5   -1.35   0.177   1      ns          
## 3 growth_rate control  mixture     5     4   -2.89   0.00388 0.0233 *           
## 4 growth_rate dmso     methan…     5     5    1.69   0.0918  0.551  ns          
## 5 growth_rate dmso     mixture     5     4   -0.0265 0.979   1      ns          
## 6 growth_rate methanol mixture     5     4   -1.62   0.106   0.637  ns